package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VCompetencias extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JLabel lblJuez;
	private JSeparator jSeparator1;
	private JLabel jLabel1;
	private JComboBox cmbhora;
	private JComboBox cmbfecha;
	private JButton btnRegistrar;
	private JButton btnasignar;
	private JLabel lblHora;
	private JLabel lblFecha;
	private JTextField txtCodCompetencia;
	private JLabel lblCodcompetencia;

	
	
	public VCompetencias() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			BorderLayout thisLayout = new BorderLayout();
			getContentPane().setLayout(thisLayout);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setBackground(java.awt.Color.white);
				jPanel1.setLayout(null);
				jPanel1.setPreferredSize(new java.awt.Dimension(475, 364));
				{
					lblCodcompetencia = new JLabel();
					jPanel1.add(lblCodcompetencia);
					lblCodcompetencia.setText("Codigo Competencia:");
					lblCodcompetencia.setBounds(30, 68, 140, 16);
					lblCodcompetencia.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					txtCodCompetencia = new JTextField();
					jPanel1.add(txtCodCompetencia);
					txtCodCompetencia.setBounds(170, 68, 121, 18);
					txtCodCompetencia.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					lblFecha = new JLabel();
					jPanel1.add(lblFecha);
					lblFecha.setText("Fecha:");
					lblFecha.setBounds(32, 97, 55, 16);
					lblFecha.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					lblHora = new JLabel();
					jPanel1.add(lblHora);
					lblHora.setText("Hora:");
					lblHora.setBounds(33, 127, 44, 16);
					lblHora.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					lblJuez = new JLabel();
					jPanel1.add(lblJuez);
					lblJuez.setText("Juez:");
					lblJuez.setBounds(33, 160, 54, 16);
					lblJuez.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					btnasignar = new JButton();
					jPanel1.add(btnasignar);
					btnasignar.setText("Asignar Juez");
					btnasignar.setBounds(334, 159, 126, 23);
					btnasignar.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					btnRegistrar = new JButton();
					jPanel1.add(btnRegistrar);
					btnRegistrar.setText("Registrar");
					btnRegistrar.setBounds(183, 220, 97, 23);
					btnRegistrar.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					ComboBoxModel cmbfechaModel = 
							new DefaultComboBoxModel(
									new String[] { "12/9/2011", "13/9/2011","14/9/2011","15/9/2011" });
					cmbfecha = new JComboBox();
					jPanel1.add(cmbfecha);
					cmbfecha.setBackground(java.awt.Color.white);
					cmbfecha.setModel(cmbfechaModel);
					cmbfecha.setBounds(170, 94, 121, 23);
					cmbfecha.setFont(new java.awt.Font("OCR A Extended",1,11));
				}
				{
					ComboBoxModel cmbhoraModel = 
							new DefaultComboBoxModel(
									new String[] { "08:00", "08:30" ,"09:00", "09:30" ,"10:00", "10:30" ,"11:00", "11:30" ,"12:00", "12:30" ,"01:00", "01:30" ,"02:00", "02:30" ,"03:00", "03:30" ,"04:00", "04:30", "05:00", "05:30" ,"06:00", "06:30","07:00", "07:30", "08:00pm", "08:30pm","09:00pm", "09:30pm" ,"10:00pm"  });
					cmbhora = new JComboBox();
					jPanel1.add(cmbhora);
					cmbhora.setBackground(java.awt.Color.white);
					cmbhora.setModel(cmbhoraModel);
					cmbhora.setBounds(171, 124, 120, 23);
					cmbhora.setFont(new java.awt.Font("OCR A Extended",1,11));
				}
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
					jLabel1.setText("juesasignado");
					jLabel1.setBounds(171, 162, 120, 16);
					//.setFont(new java.awt.Font("OCR A Extended",1,10));
				}
				{
					jSeparator1 = new JSeparator();
					jPanel1.add(jSeparator1);
					jSeparator1.setBounds(12, 31, 486, 10);
				}
			}
			pack();
			this.setSize(518, 401);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void addListener (ActionListener actionListener){
		btnasignar.addActionListener(actionListener);
		btnRegistrar.addActionListener(actionListener);
	}
	public String getcodigo(){
		return txtCodCompetencia.getText();
	}
	public String getfecha(){
		return  cmbfecha.getSelectedItem().toString();
	}
	public String gethora(){
		return cmbhora.getSelectedItem().toString();
	}
	public String getjuez(){
		return jLabel1.getText();
	}
	
	

}
